<template>
  <view class="bigBox">
    <view class="card">
      <u-button
        text="血型预测"
        @click="goTools('血型预测')"
        color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
      ></u-button>
      <u-button
        text="BMI计算"
        @click="goTools('BMI计算')"
        color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
      ></u-button>
      <u-button
        text="驾考成绩模拟"
        @click="goTools('驾考成绩模拟')"
        color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
      ></u-button>
      <u-button
        text="其他工具"
		@click="goOther"
        color="linear-gradient(to right, rgb(66, 83, 216), rgb(213, 51, 186))"
      ></u-button>
    </view>
  </view>
</template>


<script>
export default {
  
  data() {
    return {
	};
  },
  methods: {
    goTools(type){
      console.log(type)
      if(type == "驾考成绩模拟"){
        uni.navigateTo({ url: '/pagesSub/jiakaoInfo/jiakaoIndex' })
      }else{uni.navigateTo({ url: '/pagesSub/articleInfo/articleInfo?toolType='+type })}

    },
	goOther(){
		uni.navigateTo({
			url:'/pages/example/components'
		})
	}
  },
  onLoad() {},
  onShow() {
    
    // this.$store
    //   .dispatch("SetPermissions")
    //   .then((result) => {
    //     console.log(this.$auth.hasPermi("biz:questionnaire:update"));
    //     console.log(this.$auth.hasRole("a123"));
    //   })
    //   .catch((err) => {});
  },
};
</script>

<style lang="scss" scoped>
/* From Uiverse.io by joe-watson-sbf */
.bigBox {
  height: 100vh;
  display: flex;
  flex-direction: column;
  // align-items: center;
  justify-content: center;
  .card {
    height: 400rpx;
    padding: 50rpx;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }
}
</style>